package cn.jeeweb.modules.web.statistics.data;

public class EchartsData {
    public static String eData(String type, String xAxisData, String seriesData, String titleText) {
        //bar柱状图数据
        String data = "{" +
                            "backgroundColor:'rgba(128, 128, 128, 0)'," +
                            "title : {" +
                                "text: '"+titleText+"'," +
                            "}," +
                            "tooltip : {" +
                            "trigger: 'axis'" +
                            "}," +
                            "legend: {" +
                          //  "// data:['蒸发量']" +
                            "}," +
                            "grid:{" +
                                "x:30," +
                                "x2:40," +
                                "y2:24" +
                        "}," +
                        "calculable : true," +
                        "xAxis : [" +
                                "{" +
                                    "type : 'category'," +
                                    "data : "+xAxisData+
                                "}" +
                            "]," +
                            "yAxis : [" +
                            "{" +
                                "type : 'value'" +
                            "}" +
                            "]," +
                            "series : [" +
                            "{" +
                                    "name:'数量'," +
                                    "type:'"+type+"'," +
                                    "data:"+seriesData +
                                "}," +
                            "]" +
                        "}";
        return data;
    }

    public static String whcdfbData(String type, String xAxisData, String seriesData, String titleText){
        String data = "{" +
                "'title': {" +
                "'text': '劳动力文化程度分布'," +
                "}," +
                "'xAxis': {" +
                "'data': 'dataAxis'," +
                "'axisLabel': {" +
                "'inside': true," +
                "'textStyle': {" +
                "'color': '#fff'" +
                "}" +
                "}," +
                "'axisTick': {" +
                "'show': 'false'" +
                "}," +
                "'axisLine': {" +
                "'show': false" +
                "}," +
                "'z': 10" +
                "}," +
                "'yAxis': {" +
                "'axisLine': {" +
                "'show': false" +
                "}," +
                "'axisTick': {" +
                "'show': false" +
                "}," +
                "'axisLabel': {" +
                "'textStyle': {" +
                "'color': '#999'" +
                "}" +
                "}" +
                "}," +
                "'dataZoom': [" +
                "{" +
                "'type': 'inside'" +
                "}" +
                "]," +
                "'series': [" +
                "{" +
                "'type': 'bar'," +
                "'itemStyle': {" +
                "'normal': {color: 'rgba(0,0,0,0.05)'}" +
                "}," +
                "'barGap':'-100%'," +
                "'barCategoryGap':'40%'," +
                "'data': 'dataShadow'," +
                "'animation': 'false'" +
                "}," +
                "{" +
                "'type': 'bar'," +
                "'itemStyle': {" +
                "'normal': {" +
                "'color': new echarts.graphic.LinearGradient(" +
                "0, 0, 0, 1," +
                "[" +
                "{'offset': 0, 'color': '#83bff6'}," +
                "{'offset': 0.5, 'color': '#188df0'}," +
                "{'offset': 1, 'color': '#188df0'}" +
                "]" +
                ")" +
                "}," +
                "'emphasis': {" +
                "'color': new echarts.graphic.LinearGradient(" +
                "0, 0, 0, 1," +
                "[" +
                "{'offset': 0, 'color': '#2378f7'}," +
                "{'offset': 0.7, 'color': '#2378f7'}," +
                "{'offset': 1, 'color': '#83bff6'}" +
                "]" +
                ")" +
                "}" +
                "}," +
                "'data': 'data'" +
                "}" +
                "]" +
                "}";
        return data;
    }
}
